<script setup>
import { ref ,onMounted} from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  console.log('HomeView mounted')
  router.push('/login')
})

</script>

<template>
  <div class="home">
    <h1>欢迎来到任务中心平台</h1>
    <div class="navigation-links">
      <!-- <router-link to="/student-tasks" class="nav-link">
        <div class="nav-card">
          <h3>学生任务中心</h3>
          <p>查看和管理你的学习任务</p>
        </div>
      </router-link>
      <router-link to="/teacher" class="nav-link">
        <div class="nav-card">
          <h3>老师端中心</h3>
          <p>管理任务与教学环境资源</p>
        </div>
      </router-link> -->
      <router-link to="/login" class="nav-link">
        <div class="nav-card">
          <h3>去登录</h3>
          <p></p>
        </div>
      </router-link>
    </div>
  </div>
</template>

<style scoped>
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80vh;
  text-align: center;
}

.navigation-links {
  margin-top: 40px;
}

.nav-link {
  text-decoration: none;
  color: goldenrod;
}

.nav-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.nav-card h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}

.nav-card p {
  color: #7f8c8d;
  margin: 0;
  font-size: 1.1rem;
}

</style>